package com.ruoyi.business.workshop.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 车间槽位信息
 * 
 * @author ruoyi
 */
public class WorkshopSlotInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 槽位编号 */
    private Integer slotNumber;
    
    /** 每槽点位数 */
    private Integer pointsPerSlot;
    
    /** 电源箱门开关状态 */
    private Boolean powerBoxDoorOpen;
    
    /** 槽控机门开关状态 */
    private Boolean controllerDoorOpen;
    
    /** 点位信息列表 */
    private List<WorkshopPositionInfo> pointInfos;

    public WorkshopSlotInfo() {}

    public WorkshopSlotInfo(Integer slotNumber, Integer pointsPerSlot, Boolean powerBoxDoorOpen, Boolean controllerDoorOpen) {
        this.slotNumber = slotNumber;
        this.pointsPerSlot = pointsPerSlot;
        this.powerBoxDoorOpen = powerBoxDoorOpen;
        this.controllerDoorOpen = controllerDoorOpen;

        this.pointInfos = new ArrayList<>();
        for (int i = 1; i <= pointsPerSlot; i++) {
            this.pointInfos.add(new WorkshopPositionInfo(i, false, false));
        }
    }

    public Integer getSlotNumber() {
        return slotNumber;
    }

    public void setSlotNumber(Integer slotNumber) {
        this.slotNumber = slotNumber;
    }

    public Integer getPointsPerSlot() {
        return pointsPerSlot;
    }

    public void setPointsPerSlot(Integer pointsPerSlot) {
        this.pointsPerSlot = pointsPerSlot;
    }

    public Boolean getPowerBoxDoorOpen() {
        return powerBoxDoorOpen;
    }

    public void setPowerBoxDoorOpen(Boolean powerBoxDoorOpen) {
        this.powerBoxDoorOpen = powerBoxDoorOpen;
    }

    public Boolean getControllerDoorOpen() {
        return controllerDoorOpen;
    }

    public void setControllerDoorOpen(Boolean controllerDoorOpen) {
        this.controllerDoorOpen = controllerDoorOpen;
    }

    public List<WorkshopPositionInfo> getPointInfos() {
        return pointInfos;
    }

    public void setPointInfos(List<WorkshopPositionInfo> pointInfos) {
        this.pointInfos = pointInfos;
    }
}
